#ifndef ST_SOCK_HOLDER_H_INCLUDED
#define ST_SOCK_HOLDER_H_INCLUDED

#include <string>
using std::string;

class STSockHolder
{
public:
    STSockHolder(int sock);
    virtual ~STSockHolder();

    int getSock() const;
    virtual bool pushByte(char byte);
    virtual bool pushEnd();
    virtual bool pushBytes(const char* bytes, unsigned int size);

    int send(const string& str);
    int send(void* buffer, unsigned int size);
protected:
    int m_sock;
};

inline int STSockHolder::getSock() const
{
    return m_sock;
}

#endif // ST_SOCK_HOLDER_H_INCLUDED
